<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <cpn></cpn>
    <my-cpn></my-cpn>
</div>

<template id="cpp">
    <div>
        <h2>模板分离的写法</h2>
    </div>
</template>

<template id="cpp2">
    <div>
        <h2>模板分离的写法22222</h2>
    </div>
</template>

<script src="../../js/vue.js"></script>

<script>
    Vue.component("cpn", {
        // template: id = "#cpp"
        template: "#cpp"
    });
    const vue = new Vue({
        el: "#app",
        data: {
            message: "Hello vue,你好！"
        },
        methods: {
            
        },
        components: {
            myCpn: {
                template: "#cpp2"
            }
        }
    });
</script>
</body>
</html>